<form class="layui-form layui-form-pane" action="{:url()}" method="post" id="editForm">
    <div class="layui-tab-item layui-show layui-form-pane">
        <div class="layui-form-item">
            <label class="layui-form-label">订单编号</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input field-username" readonly name="ordersn" lay-verify="required" {present name="list.ordersn"}value="{$list['ordersn']}"}{/present} autocomplete="off" placeholder="提现编号">
            </div>
        </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">申请人</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input field-username" readonly name="nickname" lay-verify="required" {present name="list.nickname"}value="{$list['nickname']}"}{/present} autocomplete="off" placeholder="昵称">
            </div>
        </div>
    <div class="layui-form-item">
        <label class="layui-form-label">支付宝账户</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input field-username" readonly name="alipaynum" lay-verify="required" {present name="list.alipaynum"}value="{$list['alipaynum']}"}{/present} autocomplete="off" placeholder="支付宝账户">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">真实姓名</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input field-username" readonly name="realname" lay-verify="required" {present name="list.realname"}value="{$list['realname']}"}{/present} autocomplete="off" placeholder="真实姓名">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">红豆币</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input field-username" readonly name="rd_coin" lay-verify="required" {present name="list.rd_coin"}value="{$list['rd_coin']}"}{/present} autocomplete="off" placeholder="红豆数量">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">人民币金额</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input field-username" readonly name="money" lay-verify="required" {present name="list.money"}value="{$list['money']}"}{/present} autocomplete="off" placeholder="金额">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">申请时间</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input field-username" readonly name="create_time" lay-verify="required" {present name="list.create_time"}value="{$list['create_time']}"}{/present} autocomplete="off" placeholder="创建时间">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">状    态</label>
        <div class="layui-input-inline" style="width: 400px">
            <input type="radio" class="field-status" name="status" {present name="list.status"}{if condition="$list['status'] eq 2"}checked{/if}{/present} value="2" checked title="通过">
            <input type="radio" class="field-status" name="status" {present name="list.status"}{if condition="$list['status'] eq 4"}checked{/if}{/present} value="4" title="拒绝">
            <input type="radio" class="field-status" name="status" {present name="list.status"}{if condition="$list['status'] eq 3"}checked{/if}{/present} value="3" title="已打款">
        </div>
    </div>
    <div class="layui-form-item ">
        <label class="layui-form-label">审核意见</label>
        <div class="layui-input-block" style="width: 400px">
            <textarea placeholder="请输入内容" name="content" class="layui-textarea">{present name="list.content"}{$list['content']}{/present}</textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            {present name="list.id"}
            <input type="hidden" class="field-id" name="id" value="{$list['id']}">
            {/present}
            {present name="list.id"}
            <input type="hidden" class="field-id" name="uid" value="{$list['uid']}">
            {/present}
            <button type="submit" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="formSubmit">提交</button>
            <a href="{:url('cashlist')}" class="layui-btn layui-btn-primary ml10"><i class="aicon ai-fanhui"></i>返回</a>
        </div>
    </div>
</form>
{include file="admin@block/layui" /}
<script src="__ADMIN_JS__/footer.js"></script>

<script>
    /* 修改模式下需要将数据放入此变量 */
    var formData = {:json_encode($data_info)};
    // 会员选择回调函数
    function func(data) {
        var $ = layui.jquery;
        $('input[name="member"]').val('['+data[0]['id']+']'+data[0]['username']);
    }
    layui.use(['upload'], function() {
        var $ = layui.jquery, layer = layui.layer, upload = layui.upload;
        /**
         * 附件上传url参数说明
         * @param string $from 来源
         * @param string $group 附件分组,默认sys[系统]，模块格式：m_模块名，插件：p_插件名
         * @param string $water 水印，参数为空默认调用系统配置，no直接关闭水印，image 图片水印，text文字水印
         * @param string $thumb 缩略图，参数为空默认调用系统配置，no直接关闭缩略图，如需生成 500x500 的缩略图，则 500x500多个规格请用";"隔开
         * @param string $thumb_type 缩略图方式
         * @param string $input 文件表单字段名
         */
        upload.render({
            elem: '.layui-upload'
            ,url: '{:url("admin/annex/upload?water=&thumb=&from=&group=")}'
            ,method: 'post'
            ,before: function(input) {
                layer.msg('文件上传中...', {time:3000000});
            },done: function(res, index, upload) {
                var obj = this.item;
                if (res.code == 0) {
                    layer.msg(res.msg);
                    return false;
                }
                layer.closeAll();
                var input = $(obj).parents('.upload').find('.upload-input');
                if ($(obj).attr('lay-type') == 'image') {
                    input.siblings('img').attr('src', res.data.file).show();
                }
                input.val(res.data.file);
            }
        });
    });
</script>
